package com.hejia.alauda.persistence.mybatis;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import com.hejia.alauda.entity.FinancingIncomeRule;
import com.hejia.alauda.persistence.BaseMapper;

public interface FinancingIncomeRuleMapper extends BaseMapper<FinancingIncomeRule> {
	
	@Select("SELECT * FROM `financingincomerule` WHERE financing_id=#{id} ORDER BY holdingTime")
	List<FinancingIncomeRule> findFinancingIncomeRulesByFinancing(Long id);
	
	@Delete("DELETE FROM `financingincomerule` WHERE `financing_id`=#{id}")
	int deleteFinancingIncomeRulesByFinancing(Long id);
}
